﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Tecnorama
{
    public partial class UrunGuncelleSil : Form
    {
        public UrunGuncelleSil()
        {
            InitializeComponent();
        }

        LinqDataContext lc = new LinqDataContext();
        private void btnsil_Click(object sender, EventArgs e)
        {
       
            
        }

        private void btnguncelle_Click(object sender, EventArgs e)
        {
            int test = dataGridView1.CurrentRow.Index;
            string sonuc = dataGridView1.Rows[test].Cells[0].Value.ToString();
            Urun mk = lc.Uruns.First(k => k.MarkaID == Convert.ToInt32(sonuc));
            lc.SubmitChanges();
        }

        private void UrunGuncelleSil_Load(object sender, EventArgs e)
        {

            var sorgu = from c in lc.Uruns select c;
            lc.SubmitChanges();
            dataGridView1.DataSource = sorgu;
            dataGridView1.Columns[0].Visible = false;
        }
    }
}
